import Layout from '@/layout'
export const constantRoutes = [
  {
    path: '/login',
    component: () => import('@/views/login/index'),
    hidden: true
  },

  {
    path: '/404',
    component: () => import('@/views/404'),
    hidden: true
  },

  {
    path: '/',
    component: Layout,
    redirect: '/dashboard',
    children: [{
      path: 'dashboard',
      name: 'Dashboard',
      component: () => import('@/views/dashboard/index'),
      meta: { title: '首页', icon: 'dashboard' }
    }]
  },
  {
    path: '/daily',
    name: 'Daily',
    component: Layout,
    // redirect: '/acl/user/list',
    meta: {
      title: '日志管理',
      icon: 'el-icon-lock'
    },
    children: [
      {
        name: 'DevelopDaily',
        path: 'DevelopDaily/list',
        component: () => import('@/views/Daily/DevelopDaily/list'),
        meta: { title: '开发人员修复日志' }
      },
      {
        name: 'TestDaily',
        path: 'TestDaily/list',
        component: () => import('@/views/Daily/TestDaily/list'),
        meta: { title: '测试人员测试日志' }
      },
    ]
  },
  {
    path: '/project',
    name: 'Project',
    component: Layout,
    // redirect: '/acl/user/list',
    meta: {
      title: '项目管理',
      icon: 'el-icon-lock'
    },
    children: [
      {
        name: 'ProjectInfo',
        path: 'ProjectInfo/index',
        component: () => import('@/views/Project/index'),
        meta: { title: '项目管理' }
      },
    ]
  },
 


  // 404 page must be placed at the end !!!
 
]

export const asyncRoutes =[
  {
    path: '/product',
    component: Layout,
    name: 'Product',
    redirect: '/product/sku/list',
    meta: { title: '商品管理', icon: 'el-icon-s-shop' },
    children: [
      {
        path: 'category/list',
        component: () => import('@/views/product/category/index'),
        name: 'Category',
        meta: { title: '分类列表' }
      },
      {
        path: 'attr/list',
        component: () => import('@/views/product/attr/index'),
        name: 'Attr',
        meta: { title: '属性管理' }
      },
      {
        path: 'spu/list',
        component: () => import('@/views/product/spu/index'),
        name: 'Spu',
        meta: { title: 'spu管理' }
      },
      {
        path: 'sku/list',
        component: () => import('@/views/product/sku/index'),
        name: 'Sku',
        meta: { title: 'sku管理' }
      },
      {
        path: 'trademark/list',
        component: () => import('@/views/product/trademark/index'),
        name: 'Trademark',
        meta: { title: '品牌管理' }
      },
    ]
  },
 
    // 权限管理
    {
      path: '/acl',
      name: 'Acl',
      component: Layout,
      redirect: '/acl/user/list',
      meta: {
        title: '权限管理',
        icon: 'el-icon-lock'
      },
      children: [
        {
          name: 'User',
          path: 'user/list',
          component: () => import('@/views/acl/user/list'),
          meta: { title: '用户管理' }
        },
        {
          name: 'Role',
          path: 'role/list',
          component: () => import('@/views/acl/role/list'),
          meta: { title: '角色管理' }
        }, {
          name: 'RoleAuth',
          path: 'role/auth/:id',
          component: () => import('@/views/acl/role/roleAuth'),
          meta: { activeMenu: '/acl/role/list', title: '角色授权' },
          hidden: true
        },
        {
          name: 'Permission',
          path: 'permission/list',
          component: () => import('@/views/acl/permission/list'),
          meta: { title: '菜单管理' }
        },
      ]
    },
 
  
]
export const anyRoutes = { path: '*', redirect: '/404', hidden: true }